3.2.74 \(\int \frac {c+d \sec (e+f x)}{(a+a \sec (e+f x))^{3/2}} \, dx\) [174]

Optimal. Leaf size=127 \[ \frac {2 c \text {ArcTan}\left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{a^{3/2} f}-\frac {(5 c-d) \text {ArcTan}\left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {2} \sqrt {a+a \sec (e+f x)}}\right )}{2 \sqrt {2} a^{3/2} f}-\frac {(c-d) \tan (e+f x)}{2 f (a+a \sec (e+f x))^{3/2}} \]

[Out]

2*c*arctan(a^(1/2)*tan(f*x+e)/(a+a*sec(f*x+e))^(1/2))/a^(3/2)/f-1/4*(5*c-d)*arctan(1/2*a^(1/2)*tan(f*x+e)*2^(1
/2)/(a+a*sec(f*x+e))^(1/2))/a^(3/2)/f*2^(1/2)-1/2*(c-d)*tan(f*x+e)/f/(a+a*sec(f*x+e))^(3/2)

________________________________________________________________________________________

Rubi [A]
time = 0.12, antiderivative size = 127, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {4007, 4005, 3859, 209, 3880} \begin {gather*} -\frac {(5 c-d) \text {ArcTan}\left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {2} \sqrt {a \sec (e+f x)+a}}\right )}{2 \sqrt {2} a^{3/2} f}+\frac {2 c \text {ArcTan}\left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {a \sec (e+f x)+a}}\right )}{a^{3/2} f}-\frac {(c-d) \tan (e+f x)}{2 f (a \sec (e+f x)+a)^{3/2}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(c + d*Sec[e + f*x])/(a + a*Sec[e + f*x])^(3/2),x]

[Out]

(2*c*ArcTan[(Sqrt[a]*Tan[e + f*x])/Sqrt[a + a*Sec[e + f*x]]])/(a^(3/2)*f) - ((5*c - d)*ArcTan[(Sqrt[a]*Tan[e +
 f*x])/(Sqrt[2]*Sqrt[a + a*Sec[e + f*x]])])/(2*Sqrt[2]*a^(3/2)*f) - ((c - d)*Tan[e + f*x])/(2*f*(a + a*Sec[e +
 f*x])^(3/2))

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 3859

Int[Sqrt[csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_)], x_Symbol] :> Dist[-2*(b/d), Subst[Int[1/(a + x^2), x], x, b*(C
ot[c + d*x]/Sqrt[a + b*Csc[c + d*x]])], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0]

Rule 3880

Int[csc[(e_.) + (f_.)*(x_)]/Sqrt[csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)], x_Symbol] :> Dist[-2/f, Subst[Int[1/(2
*a + x^2), x], x, b*(Cot[e + f*x]/Sqrt[a + b*Csc[e + f*x]])], x] /; FreeQ[{a, b, e, f}, x] && EqQ[a^2 - b^2, 0
]

Rule 4005

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.) + (c_))/Sqrt[csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)], x_Symbol] :> Dist[c/a,
Int[Sqrt[a + b*Csc[e + f*x]], x], x] - Dist[(b*c - a*d)/a, Int[Csc[e + f*x]/Sqrt[a + b*Csc[e + f*x]], x], x] /
; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0]

Rule 4007

Int[(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]*(d_.) + (c_)), x_Symbol] :> Simp[(-(b
*c - a*d))*Cot[e + f*x]*((a + b*Csc[e + f*x])^m/(b*f*(2*m + 1))), x] + Dist[1/(a^2*(2*m + 1)), Int[(a + b*Csc[
e + f*x])^(m + 1)*Simp[a*c*(2*m + 1) - (b*c - a*d)*(m + 1)*Csc[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f
}, x] && NeQ[b*c - a*d, 0] && LtQ[m, -1] && EqQ[a^2 - b^2, 0] && IntegerQ[2*m]

Rubi steps

\begin {align*} \int \frac {c+d \sec (e+f x)}{(a+a \sec (e+f x))^{3/2}} \, dx &=-\frac {(c-d) \tan (e+f x)}{2 f (a+a \sec (e+f x))^{3/2}}-\frac {\int \frac {-2 a c+\frac {1}{2} a (c-d) \sec (e+f x)}{\sqrt {a+a \sec (e+f x)}} \, dx}{2 a^2}\\ &=-\frac {(c-d) \tan (e+f x)}{2 f (a+a \sec (e+f x))^{3/2}}+\frac {c \int \sqrt {a+a \sec (e+f x)} \, dx}{a^2}-\frac {(5 c-d) \int \frac {\sec (e+f x)}{\sqrt {a+a \sec (e+f x)}} \, dx}{4 a}\\ &=-\frac {(c-d) \tan (e+f x)}{2 f (a+a \sec (e+f x))^{3/2}}-\frac {(2 c) \text {Subst}\left (\int \frac {1}{a+x^2} \, dx,x,-\frac {a \tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{a f}+\frac {(5 c-d) \text {Subst}\left (\int \frac {1}{2 a+x^2} \, dx,x,-\frac {a \tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{2 a f}\\ &=\frac {2 c \tan ^{-1}\left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{a^{3/2} f}-\frac {(5 c-d) \tan ^{-1}\left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {2} \sqrt {a+a \sec (e+f x)}}\right )}{2 \sqrt {2} a^{3/2} f}-\frac {(c-d) \tan (e+f x)}{2 f (a+a \sec (e+f x))^{3/2}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C] Result contains higher order function than in optimal. Order 4 vs. order 3 in optimal.
time = 26.89, size = 11183, normalized size = 88.06 \begin {gather*} \text {Result too large to show} \end {gather*}

Warning: Unable to verify antiderivative.

[In]

Integrate[(c + d*Sec[e + f*x])/(a + a*Sec[e + f*x])^(3/2),x]

[Out]

Result too large to show

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(551\) vs. \(2(106)=212\).
time = 1.51, size = 552, normalized size = 4.35

method result size
default \(\frac {\sqrt {\frac {a \left (\cos \left (f x +e \right )+1\right )}{\cos \left (f x +e \right )}}\, \left (-4 \arctanh \left (\frac {\sqrt {-\frac {2 \cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \sin \left (f x +e \right ) \sqrt {2}}{2 \cos \left (f x +e \right )}\right ) \sqrt {2}\, \sqrt {-\frac {2 \cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \sin \left (f x +e \right ) c \cos \left (f x +e \right )-5 \ln \left (-\frac {-\sin \left (f x +e \right ) \sqrt {-\frac {2 \cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}+\cos \left (f x +e \right )-1}{\sin \left (f x +e \right )}\right ) \sqrt {-\frac {2 \cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \sin \left (f x +e \right ) c \cos \left (f x +e \right )+\ln \left (-\frac {-\sin \left (f x +e \right ) \sqrt {-\frac {2 \cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}+\cos \left (f x +e \right )-1}{\sin \left (f x +e \right )}\right ) \sqrt {-\frac {2 \cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \sin \left (f x +e \right ) d \cos \left (f x +e \right )-4 \sqrt {-\frac {2 \cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \sqrt {2}\, \arctanh \left (\frac {\sqrt {-\frac {2 \cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \sin \left (f x +e \right ) \sqrt {2}}{2 \cos \left (f x +e \right )}\right ) c \sin \left (f x +e \right )-5 \ln \left (-\frac {-\sin \left (f x +e \right ) \sqrt {-\frac {2 \cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}+\cos \left (f x +e \right )-1}{\sin \left (f x +e \right )}\right ) \sqrt {-\frac {2 \cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \sin \left (f x +e \right ) c +\ln \left (-\frac {-\sin \left (f x +e \right ) \sqrt {-\frac {2 \cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}+\cos \left (f x +e \right )-1}{\sin \left (f x +e \right )}\right ) \sqrt {-\frac {2 \cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \sin \left (f x +e \right ) d +2 \left (\cos ^{2}\left (f x +e \right )\right ) c -2 \left (\cos ^{2}\left (f x +e \right )\right ) d -2 c \cos \left (f x +e \right )+2 d \cos \left (f x +e \right )\right )}{4 f \left (\cos \left (f x +e \right )+1\right ) \sin \left (f x +e \right ) a^{2}}\) \(552\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c+d*sec(f*x+e))/(a+a*sec(f*x+e))^(3/2),x,method=_RETURNVERBOSE)

[Out]

1/4/f*(a*(cos(f*x+e)+1)/cos(f*x+e))^(1/2)*(-4*arctanh(1/2*(-2*cos(f*x+e)/(cos(f*x+e)+1))^(1/2)*sin(f*x+e)/cos(
f*x+e)*2^(1/2))*2^(1/2)*(-2*cos(f*x+e)/(cos(f*x+e)+1))^(1/2)*sin(f*x+e)*c*cos(f*x+e)-5*ln(-(-sin(f*x+e)*(-2*co
s(f*x+e)/(cos(f*x+e)+1))^(1/2)+cos(f*x+e)-1)/sin(f*x+e))*(-2*cos(f*x+e)/(cos(f*x+e)+1))^(1/2)*sin(f*x+e)*c*cos
(f*x+e)+ln(-(-sin(f*x+e)*(-2*cos(f*x+e)/(cos(f*x+e)+1))^(1/2)+cos(f*x+e)-1)/sin(f*x+e))*(-2*cos(f*x+e)/(cos(f*
x+e)+1))^(1/2)*sin(f*x+e)*d*cos(f*x+e)-4*(-2*cos(f*x+e)/(cos(f*x+e)+1))^(1/2)*2^(1/2)*arctanh(1/2*(-2*cos(f*x+
e)/(cos(f*x+e)+1))^(1/2)*sin(f*x+e)/cos(f*x+e)*2^(1/2))*c*sin(f*x+e)-5*ln(-(-sin(f*x+e)*(-2*cos(f*x+e)/(cos(f*
x+e)+1))^(1/2)+cos(f*x+e)-1)/sin(f*x+e))*(-2*cos(f*x+e)/(cos(f*x+e)+1))^(1/2)*sin(f*x+e)*c+ln(-(-sin(f*x+e)*(-
2*cos(f*x+e)/(cos(f*x+e)+1))^(1/2)+cos(f*x+e)-1)/sin(f*x+e))*(-2*cos(f*x+e)/(cos(f*x+e)+1))^(1/2)*sin(f*x+e)*d
+2*cos(f*x+e)^2*c-2*cos(f*x+e)^2*d-2*c*cos(f*x+e)+2*d*cos(f*x+e))/(cos(f*x+e)+1)/sin(f*x+e)/a^2

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c+d*sec(f*x+e))/(a+a*sec(f*x+e))^(3/2),x, algorithm="maxima")

[Out]

integrate((d*sec(f*x + e) + c)/(a*sec(f*x + e) + a)^(3/2), x)

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 249 vs. \(2 (112) = 224\).
time = 8.81, size = 591, normalized size = 4.65 \begin {gather*} \left [-\frac {4 \, {\left (c - d\right )} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right ) \sin \left (f x + e\right ) - \sqrt {2} {\left ({\left (5 \, c - d\right )} \cos \left (f x + e\right )^{2} + 2 \, {\left (5 \, c - d\right )} \cos \left (f x + e\right ) + 5 \, c - d\right )} \sqrt {-a} \log \left (\frac {2 \, \sqrt {2} \sqrt {-a} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right ) \sin \left (f x + e\right ) + 3 \, a \cos \left (f x + e\right )^{2} + 2 \, a \cos \left (f x + e\right ) - a}{\cos \left (f x + e\right )^{2} + 2 \, \cos \left (f x + e\right ) + 1}\right ) + 8 \, {\left (c \cos \left (f x + e\right )^{2} + 2 \, c \cos \left (f x + e\right ) + c\right )} \sqrt {-a} \log \left (\frac {2 \, a \cos \left (f x + e\right )^{2} + 2 \, \sqrt {-a} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right ) \sin \left (f x + e\right ) + a \cos \left (f x + e\right ) - a}{\cos \left (f x + e\right ) + 1}\right )}{8 \, {\left (a^{2} f \cos \left (f x + e\right )^{2} + 2 \, a^{2} f \cos \left (f x + e\right ) + a^{2} f\right )}}, -\frac {2 \, {\left (c - d\right )} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right ) \sin \left (f x + e\right ) - \sqrt {2} {\left ({\left (5 \, c - d\right )} \cos \left (f x + e\right )^{2} + 2 \, {\left (5 \, c - d\right )} \cos \left (f x + e\right ) + 5 \, c - d\right )} \sqrt {a} \arctan \left (\frac {\sqrt {2} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right )}{\sqrt {a} \sin \left (f x + e\right )}\right ) + 8 \, {\left (c \cos \left (f x + e\right )^{2} + 2 \, c \cos \left (f x + e\right ) + c\right )} \sqrt {a} \arctan \left (\frac {\sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right )}{\sqrt {a} \sin \left (f x + e\right )}\right )}{4 \, {\left (a^{2} f \cos \left (f x + e\right )^{2} + 2 \, a^{2} f \cos \left (f x + e\right ) + a^{2} f\right )}}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c+d*sec(f*x+e))/(a+a*sec(f*x+e))^(3/2),x, algorithm="fricas")

[Out]

[-1/8*(4*(c - d)*sqrt((a*cos(f*x + e) + a)/cos(f*x + e))*cos(f*x + e)*sin(f*x + e) - sqrt(2)*((5*c - d)*cos(f*
x + e)^2 + 2*(5*c - d)*cos(f*x + e) + 5*c - d)*sqrt(-a)*log((2*sqrt(2)*sqrt(-a)*sqrt((a*cos(f*x + e) + a)/cos(
f*x + e))*cos(f*x + e)*sin(f*x + e) + 3*a*cos(f*x + e)^2 + 2*a*cos(f*x + e) - a)/(cos(f*x + e)^2 + 2*cos(f*x +
 e) + 1)) + 8*(c*cos(f*x + e)^2 + 2*c*cos(f*x + e) + c)*sqrt(-a)*log((2*a*cos(f*x + e)^2 + 2*sqrt(-a)*sqrt((a*
cos(f*x + e) + a)/cos(f*x + e))*cos(f*x + e)*sin(f*x + e) + a*cos(f*x + e) - a)/(cos(f*x + e) + 1)))/(a^2*f*co
s(f*x + e)^2 + 2*a^2*f*cos(f*x + e) + a^2*f), -1/4*(2*(c - d)*sqrt((a*cos(f*x + e) + a)/cos(f*x + e))*cos(f*x
+ e)*sin(f*x + e) - sqrt(2)*((5*c - d)*cos(f*x + e)^2 + 2*(5*c - d)*cos(f*x + e) + 5*c - d)*sqrt(a)*arctan(sqr
t(2)*sqrt((a*cos(f*x + e) + a)/cos(f*x + e))*cos(f*x + e)/(sqrt(a)*sin(f*x + e))) + 8*(c*cos(f*x + e)^2 + 2*c*
cos(f*x + e) + c)*sqrt(a)*arctan(sqrt((a*cos(f*x + e) + a)/cos(f*x + e))*cos(f*x + e)/(sqrt(a)*sin(f*x + e))))
/(a^2*f*cos(f*x + e)^2 + 2*a^2*f*cos(f*x + e) + a^2*f)]

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {c + d \sec {\left (e + f x \right )}}{\left (a \left (\sec {\left (e + f x \right )} + 1\right )\right )^{\frac {3}{2}}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c+d*sec(f*x+e))/(a+a*sec(f*x+e))**(3/2),x)

[Out]

Integral((c + d*sec(e + f*x))/(a*(sec(e + f*x) + 1))**(3/2), x)

________________________________________________________________________________________

Giac [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c+d*sec(f*x+e))/(a+a*sec(f*x+e))^(3/2),x, algorithm="giac")

[Out]

Exception raised: TypeError >> An error occurred running a Giac command:INPUT:sage2:=int(sage0,sageVARx):;OUTP
UT:Warning, integration of abs or sign assumes constant sign by intervals (correct if the argument is real):Ch
eck [abs(co

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {c+\frac {d}{\cos \left (e+f\,x\right )}}{{\left (a+\frac {a}{\cos \left (e+f\,x\right )}\right )}^{3/2}} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c + d/cos(e + f*x))/(a + a/cos(e + f*x))^(3/2),x)

[Out]

int((c + d/cos(e + f*x))/(a + a/cos(e + f*x))^(3/2), x)

________________________________________________________________________________________